<template>
  <div id="skillIndex" v-loading="loading">
    <crumb />
    <el-container>
      <el-aside width="300px" style="background-color: #fff" class="leftBtn">
        <el-button type="primary">添加班级代码<i class="el-icon-collection el-icon--right icon"></i></el-button>
      </el-aside>
      <el-container class="leftBg">
        <el-main>
          <el-row :gutter="12">
            <el-col :span="6" v-for="(item, i) in list" :key="i" class="col-left">
              <el-card :body-style="{ padding: '0px' }">
                <div class="imageBox">
                  <img :src="item.src" v-if="item.src" class="image">
                  <i class="el-icon-picture" v-else></i>
                </div>
                <div style="padding: 14px;">
                  <b style="font-weight: bold;">{{item.title}}</b>
                  <div class="bottom clearfix">
                    <time class="time">{{ item.num }}</time>
                    <el-button type="text" class="button">{{item.nowLearn}}</el-button>
                  </div>
                </div>
              </el-card>
            </el-col>
          </el-row>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data () {
    return {
      questionsInfo: {}, // 题目列表
      list: [
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' },
        { title: '英语视听说', num: '共20章节', nowLearn: '33人正在学', src: '' }
      ],
      loading: true
    }
  },
  components: {
  },
  mounted () {
    setTimeout(() => {
      this.loading = false
      this.$router.push({ name: 'skillDetail' })
    }, 1000)
  },
  methods: {
  }

}
</script>

<style scoped lang="scss">
#skillIndex{
  .leftBtn{
    display: flex;flex-wrap: wrap;justify-content: center;align-items: center;
    button{
      font-size:20px;
    }
    .icon{
      font-size: 20px;
    }
  }
  .leftBg{
    background: #fff;margin-left:20px;
  }
  .col-left{
    margin-left: 0;padding: 10px;
  }
  .time {
    font-size: 12px;
    color: #999;
  }
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }
  .button {
    padding: 0;
    float: right;
  }
  .imageBox{
    width:100%;height:160px;display: flex;align-items: center;justify-content: center;border-bottom: solid 1px #EBEEF5;text-align:center;font-size: 30px;color: #EBEEF5;
  }
  .image {
    width: 100%;
    display: block;
  }
  .clearfix:before,
  .clearfix:after {
      display: table;
      content: "";
  }
  .clearfix:after {
      clear: both
  }
}
</style>
